<!DOCTYPE html>
<!-- saved from url=(0181)https://ent.safe517.com/fdWebCompany/reg/reg_second.jsp?certType=%25E5%25B7%25A5%25E5%2595%2586%25E8%2590%25A5%25E4%25B8%259A%25E6%2589%25A7%25E7%2585%25A7&certNo=92513427MA63348925 -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>智慧后勤系统</title>
    <link href="./common.css" rel="stylesheet" type="text/css">
    <link href="./style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
        .gray {
            border-bottom: 1px solid #dcdddd;
            color: gray;
            text-align: left;
            padding-left: 13.5%;
        }
    </style>
    <script src="${basePath}/static/layer/layer.js"></script>
    <script src="./jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="./common.js" type="text/javascript"></script>
    <script src="./reAlert.js" type="text/javascript" charset="utf-8"></script>
    <script src="./custome.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/ecmascript" src="./base64.js"></script>
    <script type="text/javascript">

        var certType = "工商营业执照";
        var certNo = "92513427MA63348925";
//        var certNo = ${certNo!};
        var endDate = "null";
        var companyName = isnull("null");
        var companyBizAddress = isnull("null");
        var companyNameAbbrev = isnull("null");
        var companyRegAddress = isnull("null");
        var regionProvinceId = isnull("null");
        var regionCityId = isnull("null");
        var regionCountyId = isnull("null");
        var regionStreetId = isnull("null");
        var webCompanyStatus = isnull("null");
        var webLocationCity = isnull("上海市");
        var checkUserNameFlag = true;
        var checkCompanyNameFlag = true;
        var flag = isnull("null");
        var certData = isnull("null");
        var locationProvince = "";
        var locationCity = "上海市";

        function isUserName(code) {
            var reCode = /^[a-zA-Z0-9@_]{4,20}$/;
            return (reCode.test(code));
        }
        function isPwd(code) {
            var reCode = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?![_@]+$)[a-zA-Z0-9@_]{6,20}$/;
            return (reCode.test(code));
        }
        function checkUserName() {
            $("#username").siblings(".text_ts").remove();
            var userName = $("#username").val().trim();
            if (userName != null && userName != "" && !isUserName(userName)) {
                $("#username").after('<span class="text_ts">账号是4-20位数字、大小写字母、@_的至少两种组合。   </span>');
                return;
            }
            $.ajax({
                url: "/blog/checkUserExists",
                type: "post",
                dataType: 'json',
                data: {"userName": userName},
                success: function (result) {
                    if (result.body == true) {
                        $("#username").siblings(".text_ts").remove();
                        $("#username").after('<span class="text_ts">该用户名已存在 </span>');
                        checkUserNameFlag = false;
                    } else {
                        checkUserNameFlag = true;
                    }
                },
                error: function (data) {
                    alert("加载失败，请重试！");
                }
            });
        }
        function checkCompanyName() {
            $("#companyName").siblings(".text_ts").remove();
            var companyName = $("#companyName").val().trim();
            if (!checkSpecificKey(companyName)) {
                $("#companyName").after('<span class="text_ts">请勿输入特殊字符 </span>');
                return;
            }
            if (companyName != "" && companyName != null && companyName != "null") {
                $.ajax({
                    url: "/blog/checkCompanyExists",
                    type: "post",
                    dataType: 'json',
                    data: {"companyName": companyName},
                    success: function (result) {
                        if (result.body == true) {
                            $("#companyName").after('<span class="text_ts">该企业名称已存在 </span>');
                            checkCompanyNameFlag = false;
                        } else {
                            checkCompanyNameFlag = true;
                        }
                    },
                    error: function (data) {
                        alert("加载失败，请重试！");
                    }
                });
            }
        }
        function listRegions(provinceId, cityId, districtId, streetId) {
            $("#provinces option:gt(0)").remove();
            $("#cities option:gt(0)").remove();
            $("#districts option:gt(0)").remove();
            $("#streets option:gt(0)").remove();
            $.ajax({
                url: "/blog/getAdminRegion/",
                type: "get",
                success: function (result) {
                    for (var i = 0; i < result.length; i++) {
                        var $provinces = $("<option>" + result[i].name + "</option>");
                        $provinces.data("provinces", result[i].id);
                        $("#provinces").append($provinces);
                    }
                    $.ajax({
                        url: "/blog/getAdminRegion/" + provinceId,
                        type: "get",
                        success: function (result) {
                            var province = result.name;
                            $("#provinces option:contains(" + province + ")").attr("selected", "selected");
                            //$("#provinceName").text(province);
                        }
                    });
                }
            });
            $.ajax({
                url: "/blog/getAdminRegion/" + provinceId,
                type: "get",
                success: function (result) {
                    for (var i = 0; i < result.length; i++) {
                        var $cities = $("<option>" + result[i].name + "</option>");
                        $cities.data("cities", result[i].id);
                        $("#cities").append($cities);
                    }
                    $.ajax({
                        url: "/blog/getAdminRegion/getRegionById/" + cityId,
                        type: "get",
                        success: function (result) {
                            var city = result.name;
                            $("#cities option:contains(" + city + ")").attr("selected", "selected");
                            //$("#cityName").text(city);
                        }
                    });
                }
            });
            $.ajax({
                url: "/blog/getAdminRegion/" + cityId,
                type: "get",
                success: function (result) {
                    for (var i = 0; i < result.length; i++) {
                        var $districts = $("<option>" + result[i].name + "</option>");
                        $districts.data("districts", result[i].id);
                        $("#districts").append($districts);
                    }
                    if (districtId != '') {
                        $.ajax({
                            url: "/blog/getAdminRegion/getRegionById/" + districtId,
                            type: "get",
                            success: function (result) {
                                var district = result.name;
                                $("#districts option:contains(" + district + ")").attr("selected", "selected");
                                //$("#districtName").text(district);
                            }
                        });
                    }
                }
            });
            if (districtId != '') {
                $.ajax({
                    url: "/blog/getAdminRegion/" + districtId,
                    type: "get",
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $streets = $("<option>" + result[i].name + "</option>");
                            $streets.data("streets", result[i].id);
                            $("#streets").append($streets);
                        }
                        if (streetId != '') {
                            $.ajax({
                                url: "/blog/getAdminRegion/getRegionById/" + streetId,
                                type: "get",
                                success: function (result) {
                                    var street = result.name;
                                    $("#streets option:contains(" + street + ")").attr("selected", "selected");
                                    //$("#streetName").text(street);
                                }
                            });
                        }
                    }
                });
            }
        }
        $(function () {
            if (locationCity != "上海市") {
                $("#huanjie").show();
                $("#huanjie2").show();
            } else {
                $("#huanjie").hide();
                $("#huanjie2").hide();
            }
            if (certType == "工商营业执照") {
                $("#radio_c1").attr('checked', 'true');
            } else if (certType == "食品流通许可证") {
                $("#webCompanyType_01").hide();
                $("#radio_c2").attr('checked', 'true');
                $("#webCompanyType_03").hide();
                $("#webCompanyType_04").hide();
            } else if (certType == "食品生产许可证") {
                $("#webCompanyType_01").hide();
                $("#webCompanyType_02").hide();
                $("#radio_c3").attr('checked', 'true');
                $("#webCompanyType_04").hide();
            } else if (certType == "餐饮服务许可证") {
                $("#radio_c1").attr('checked', 'true');
                $("#webCompanyType_02").hide();
                $("#webCompanyType_03").hide();
                $("#webCompanyType_04").hide();
            } else if (certType == "食品经营许可证") {
                if (webCompanyStatus == "单位食堂" || webCompanyStatus == "餐饮服务经营者") {
                    $("#radio_c1").attr('checked', 'true');
                    $("#webCompanyType_02").hide();
                    $("#webCompanyType_03").hide();
                    $("#webCompanyType_04").hide();
                } else if (webCompanyStatus == "食品销售经营者") {
                    $("#webCompanyType_01").hide();
                    $("#radio_c2").attr('checked', 'true');
                    $("#webCompanyType_03").hide();
                    $("#webCompanyType_04").hide();
                } else {
                    $("#radio_c1").attr('checked', 'true');
                    $("#webCompanyType_03").hide();
                    $("#webCompanyType_04").hide();
                }
            }
            $("#certType").text(certType);
            $("#certNo").text(certNo);
            $("#companyName").val(companyName);
            $("#address").val(companyRegAddress);
            //加载省
            $("#provinces").children().eq(0).data("provinces", "");
            $("#cities").children().eq(0).data("cities", "");
            $("#districts").children().eq(0).data("districts", "");
            $("#streets").children().eq(0).data("street", "");
            if (flag == 1) {
                $("#companyName").attr("disabled", true);
                if (parseInt(certData) < 10) {
                    $("#address").attr("disabled", true);
                    $("select").attr("disabled", true);
                }
                listRegions(regionProvinceId, regionCityId, regionCountyId, regionStreetId);
            } else {
                $.ajax({
                    url: "/blog/getAdminRegion",
                    type: "get",
                    async: false,
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $provinces = $("<option>" + result[i].name + "</option>");
                            $provinces.data("provinces", result[i].id);
                            $("#provinces").append($provinces);
                        }
                        $("#provinces option:contains(" + locationProvince + ")").attr("selected", "selected");
                        $("#provinceName").text(locationProvince);
                    }
                });
                var province = $("#provinces option:selected").data("provinces");
                $.ajax({
                    url: "/blog/getAdminRegion/" + province,
                    type: "get",
                    async: false,
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $cities = $("<option>" + result[i].name + "</option>");
                            $cities.data("cities", result[i].id);
                            $("#cities").append($cities);
                        }
                        $("#cities option:contains(" + locationCity + ")").attr("selected", "selected");
                        $("#cityName").text(locationCity);
                    }
                });
                var city = $("#cities option:selected").data("cities");
                $.ajax({
                    url: "/blog/getAdminRegion/" + city,
                    type: "get",
                    async: false,
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $districts = $("<option>" + result[i].name + "</option>");
                            $districts.data("districts", result[i].id);
                            $("#districts").append($districts);
                        }
                    }
                });
            }
            //checkCompanyName();
            //$("#companyName").blur(checkCompanyName);
            $("#username").blur(checkUserName);
            /* $("#companyName").focus(function(){
             var n=$("#companyName").siblings(".text_ts").length;
             if(n==0){
             $("#companyName").after('<span class="text_ts">请输入上一步所选证照上的单位名称 </span>');
             }
             })
             $("#address").focus(function(){
             var n=$("#companyName").siblings(".text_ts").length;
             if(n==0){
             $("#address").after('<span class="text_ts">请输入上一步所选证照上的注册地址 </span>');
             }
             })
             $("#address").blur(function(){
             $("#address").next(".text_ts").remove();
             }) */


            //省变更时加载市
            $("#provinces").change(function () {
                var province = $("#provinces option:selected").data("provinces");
                $("#cities option:gt(0)").remove();
                $("#districts option:gt(0)").remove();
                $("#streets option:gt(0)").remove();
                $.ajax({
                    url: "/blog/getAdminRegion/" + province,
                    type: "get",
                    async: false,
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $cities = $("<option>" + result[i].name + "</option>");
                            $cities.data("cities", result[i].id);
                            $("#cities").append($cities);
                        }
                    }
                });
                $("#provinceName").text("");
                $("#cityName").text("");
                $("#districtName").text("");
                $("#streetName").text("");
                if ($("#provinces option:selected").text() != "请选择") {
                    $("#provinceName").text($("#provinces option:selected").text());
                }
            });
            //市变更时加载区
            $("#cities").change(function () {
                var city = $("#cities option:selected").data("cities");
                $("#districts option:gt(0)").remove();
                $("#streets option:gt(0)").remove();
                $.ajax({
                    url: "/blog/getAdminRegion/" + city,
                    type: "get",
                    async: false,
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $districts = $("<option>" + result[i].name + "</option>");
                            $districts.data("districts", result[i].id);
                            $("#districts").append($districts);
                        }
                    }
                });
                $("#cityName").text("");
                $("#districtName").text("");
                $("#streetName").text("");
                if ($("#cities option:selected").text() != "请选择") {
                    $("#cityName").text($("#cities option:selected").text());
                }
            });
            //区变更时加载街道
            $("#districts").change(function () {
                var disctrict = $("#districts option:selected").data("districts");
                $("#streets option:gt(0)").remove();
                $.ajax({
                    url: "/blog/getAdminRegion/" + disctrict,
                    type: "get",
                    async: false,
                    success: function (result) {
                        for (var i = 0; i < result.length; i++) {
                            var $streets = $("<option>" + result[i].name + "</option>");
                            $streets.data("streets", result[i].id);
                            $("#streets").append($streets);
                        }
                    }
                });
                $("#districtName").text("");
                $("#streetName").text("");
                if ($("#districts option:selected").text() != "请选择区县") {
                    $("#districtName").text($("#districts option:selected").text());
                }
            });
            $("#streets").change(function () {
                $("#streetName").text("");
                if ($("#streets option:selected").text() != "请选择街道") {
                    $("#streetName").text($("#streets option:selected").text());
                }
            });
            $("#back").click(function () {
                window.location.href = "javascript:history.back(-1);";
            });
            //特殊字符验证
            $("body").on("blur", "input[type='text']", function () {
                $(this).siblings(".text_ts").remove();
                var inputValue = $(this).val();
                if (checkSpecificKey(inputValue) == false) {
                    $(this).after('<span class="text_ts">请勿入特殊字符 </span>');
                }
            });
            $("#mobilephone").blur(function () {
                var contactPhone = $("#mobilephone").val().trim();
                $(this).siblings(".text_ts").remove();
                if (!(contactPhone == "" || contactPhone == null || isMobilephone(contactPhone))) {
                    $("#mobilephone").after('<span class="text_ts">请输入正确手机号码 </span>');
                }
            });
            $("#password").blur(function () {
                $("#password").siblings(".text_ts").remove();
                var password = $("#password").val().trim();
                //if(password!=null&&password!=""&&!isPwd(password)){
                //$("#password").after('<span class="text_ts">密码是6-20位数字、大小写字母、@_的至少两种组合。 </span>');
                if (checkSpecificKey(password) == false) {
                    $("#password").after('<span class="text_ts">请勿输入特殊字符 </span>');
                    return;
                }
                //非空输入框非空验证
                if (password == "" || password == null) {
                    $("#password").after('<span class="text_ts">新密码不能为空 </span>');
                    return;
                }
                if (password != "") {
                    var reg = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?![_@]+$)[a-zA-Z0-9@_]{6,20}$/;
                    if (!reg.test(password)) {
                        $("#password").after('<span class="text_ts">密码是6-20位数字、大小写字母、@_的至少两种组合。 </span>');

                        return;
                    }
                }
                //return;
                //}
            });
            $("#password_confirm").blur(function () {
                $("#password_confirm").siblings(".text_ts").remove();
                var password = $("#password").val().trim();
                var password_confirm = $("#password_confirm").val().trim();
                //if($("#password_confirm").val().trim()!=$("#password").val().trim()){
                //$("#password_confirm").after('<span class="text_ts">您两次输入的密码不一致，请重新输入！！</span>');
                //}
                if (checkSpecificKey(password_confirm) == false) {
                    $("#password_confirm").after('<span class="text_ts">请勿输入特殊字符 </span>');

                    return;
                }
                //非空输入框非空验证
                if (password_confirm == "" || password_confirm == null) {
                    $("#password_confirm").after('<span class="text_ts">确认密码不能为空 </span>');

                    return;
                }
                if (password_confirm != password) {
                    $("#password_confirm").after('<span class="text_ts">您两次输入的密码不一致，请重新输入！！ </span>');

                    return;
                }
            })
            $("#btn_save").click(function () {
                var params = {};
                $(".text_ts").remove();

                if (!checkUserNameFlag) {
                    $("#username").siblings(".text_ts").remove();
                    $("#username").after('<span class="text_ts">该用户名已存在 </span>');
                }
                if (!checkCompanyNameFlag) {
                    $("#companyName").siblings(".text_ts").remove();
                    $("#companyName").after('<span class="text_ts">该企业名称已存在 </span>');
                }
                var ajaxFlag = true;
//                //地区判断
                var optflag = true;
//                $("tr:eq(2) option:selected").each(function () {
//                    var opt = $(this).text();
//                    if (opt.indexOf("请选择") >= 0) {
//                        optflag = false;
//                    }
//                })
//                if (optflag == false) {
//                    $(".select_s:eq(3)").after('<span class="text_ts">必要信息不能为空</span>');
//                    ajaxFlag = false;
//                }
//                $("tr input").each(function () {
//                    var input = $(this).val().trim();
//                    if (input == null || input == "") {
//                        $(this).after('<span class="text_ts">必要信息不能为空 </span>');
//                        ajaxFlag = false;
//                    }
//                })
//                if ($("#streets").find("option:selected").data("streets") == null || $("#streets").find("option:selected").data("streets") == "") {
//                    $(".mmmaaa").after('<span class="text_ts">不能为空 </span>');
//                    ajaxFlag = false;
//                }
//                $("tr input").each(function () {
//                    var input = $(this).val().trim();
//                    if (checkSpecificKey(input) == false) {
//                        $(this).after('<span class="text_ts">请勿输入特殊字符 </span>');
//                        ajaxFlag = false;
//                    }
//                });
//		var password=$("#password").val().trim();
//		if(password!=null&&password!=""&&!isPwd(password)){
//			$("#password").after('<span class="text_ts">请输入正确密码格式</span>');
//			ajaxFlag=false;
//		}
                var userName = $("#username").val().trim();
                if (userName != null && userName != "" && !isUserName(userName)) {
                    $("#username").after('<span class="text_ts">请输入正确用户名格式 </span>');
                    ajaxFlag = false;
                }
                if ($("#password_confirm").val().trim() != $("#password").val().trim()) {
                    $("#password_confirm").after('<span class="text_ts">输入密码不一致</span>');
                    ajaxFlag = false;
                }
                var mobilephone = $("#mobilephone").val().trim();
                if (mobilephone != null && mobilephone != "" && !isMobilephone(mobilephone)) {
                    $("#mobilephone").after('<span class="text_ts">手机号码格式不正确</span>');
                    ajaxFlag = false;
                }
                if (ajaxFlag && checkUserNameFlag && checkCompanyNameFlag) {
//                    $("#btn_save").attr("disabled", true);
                    var certType = $("#certType").text();
                    var certNo = $("#certNo").text();
                    var companyName = $("#companyName").val().trim();
                    var companyRegAddress = $("#provinceName").text() + $("#cityName").text() + $("#districtName").text() + $("#streetName").text() + $("#address").val().trim();
                    var loginUserName = $("#username").val().trim();
                    var loginUserPsw = $("#password").val().trim();
                    var loginUserPersonName = $("#person").val().trim();
                    var loginUserMobile = $("#mobilephone").val().trim();
                    var regionProvinceId = $("#provinces").find("option:selected").data("provinces");
                    var regionCityId = $("#cities").find("option:selected").data("cities");
                    var regionCountyId = $("#districts").find("option:selected").data("districts");
                    var regionStreetId = $("#streets").find("option:selected").data("streets");
                    var webCompanyType = $("input[name='webCompanyType']:checked").val();
                    if (certType == "工商营业执照") {
                        params.bizCertNum = certNo;
                    }
                    if (certType == "食品流通许可证") {
                        params.foodCircuCert = certNo;
                    }
                    if (certType == "食品生产许可证") {
                        params.foodProdCert = certNo;
                    }
                    if (certType == "餐饮服务许可证") {
                        params.cateringCert = certNo;
                    }
                    if (certType == "食品经营许可证") {
                        params.foodBusinessCert = certNo;
                        params.endDate = endDate;
                    }
                    params.companyName = companyName;
                    params.companyRegAddress = companyRegAddress;
                    params.loginUserName = loginUserName;
                    params.loginUserPsw = loginUserPsw;
                    params.loginUserPersonName = loginUserPersonName;
                    params.loginUserMobile = loginUserMobile;
//                    if (locationCity != "上海市") {
                        params.webCompanyType = webCompanyType;
//                    }
                    if (companyBizAddress == "") {
                        companyBizAddress = companyRegAddress;
                    }
                    //隐藏信息
                    params.companyNameAbbrev = companyNameAbbrev;
                    params.companyBizAddress = companyBizAddress;
                    params.regionProvinceId = regionProvinceId;
                    params.regionCityId = regionCityId;
                    params.regionCountyId = regionCountyId;
                    params.regionStreetId = regionStreetId;
                    if (certData != "") {
                        params.regByOfficialCert = certData;
                    }
                    console.log(params);
                    var ajaxData = {"companyWithLoginAdmin": JSON.stringify(params)}
                    console.log(ajaxData)
                   var ajaxData = {
                        certNo:certNo,
                        companyName : companyName,
                        companyRegAddress : companyRegAddress,
                        loginUserName : loginUserName,
                        loginUserPsw : loginUserPsw,
                        loginUserPersonName : loginUserPersonName,
                        loginUserMobile : loginUserMobile,
                        webCompanyType : webCompanyType,
                        companyBizAddress : companyRegAddress,
                        companyNameAbbrev : companyNameAbbrev,
                        companyBizAddress : companyBizAddress,
                        regionProvinceId : regionProvinceId,
                        regionCityId : regionCityId,
                        regionCountyId : regionCountyId,
                        regionStreetId : regionStreetId,
                        regByOfficialCert : certData
                    };
                    $.post("/blog/createCompanyWithLoginAdmin",ajaxData,function (res) {

                        if(res["success"]){
                                window.location.href = "/login";
                        }
                    });
//                    $.ajax({
//                        url: "/blog/createCompanyWithLoginAdmin",
//                        type: "post",
//                        headers: {
//                            'Accept': 'application/json',
//                            'Content-Type': 'application/json'
//                        },
//                        dataType: 'json',
//                        data: ajaxdata,
//                        success: function (result) {
//                            if (result.status == 0) {
//                                var company = encodeURI(encodeURI(companyName));
//                                var user = encodeURI(encodeURI(loginUserName));
//                                var password = encodeURI(encodeURI(loginUserPsw));
//                                var b = new Base64();
//                                password = b.encode(password);
//                                window.alert("注册成功")
////                                window.parent.location.href = "/index/doLogin" + company + "&user=" + user + "&password=" + password;
//                            } else {
//                                alert(result.message);
//                                $("#btn_save").attr("disabled", false);
//                            }
//                        },
//                        error: function (data) {
//                            alert("加载失败，请重试！");
//                        }
//                    });
                }
            });
        })
    </script>
</head>
<body>
<div class="main_box">
    <div class="main_con">
        <h3 class="reg_fh"><a href="https://ent.safe517.com/fdWebCompany/reg/reg_frame.jsp" target="_top"><i
                class="i_fh"></i><span>返回</span></a></h3>
        <div class="reg_tent">
            <div class="reg_title">
                <ul class="reg_list">
                    <li><span><i>1</i><em>验证</em></span></li>
                    <li class="default"><span><i>2</i><em>注册</em></span></li>
                    <li><span><i>3</i><em>完成</em></span></li>
                </ul>
            </div>
            <div class="reg_detail">
                <div class="info_box" style="min-height:300px;">
                    <table class="info_mation">
                        <tbody>
                        <tr>
                            <td class="td_lf"><em class="star">*</em>证件类型</td>
                            <td>
                                <span id="certType">工商营业执照</span>
                                <span id="certNo">${certNo!}</span>
                                <input type="hidden" name="num" value="${certNo!}">
                            </td>
                        </tr>
                        <tr id="huanjie" style="display:none;">
                            <td class="td_lf"><em class="star">*</em>所属环节</td>
                            <td id="webCompanyType">
                                <label for="radio_c1" id="webCompanyType_01"><input type="radio" name="webCompanyType"
                                                                                    id="radio_c1" value="CATERING"
                                                                                    checked="checked"> 餐饮</label>
                                <label for="radio_c2" id="webCompanyType_02"><input type="radio" name="webCompanyType"
                                                                                    id="radio_c2" value="CIRCU">
                                    流通</label>
                                <label for="radio_c3" id="webCompanyType_03"><input type="radio" name="webCompanyType"
                                                                                    id="radio_c3" value="PROD">
                                    生产</label>
                                <label for="radio_c4" id="webCompanyType_04"><input type="radio" name="webCompanyType"
                                                                                    id="radio_c4" value="MGR">
                                    管理公司</label>
                            </td>
                        </tr>
                        <tr id="huanjie2" style="display:none;">
                            <td colspan="2" class="gray">注：使用工商证和食品经营证注册时请自行选择所属环节；使用其它证件注册时系统默认分配环节，如想修改请返回上一步更换证件.
                            </td>
                        </tr>
                        <tr>
                            <td class="td_lf"><em class="star">*</em>单位名称</td>
                            <td><input id="companyName" type="text" class="input_code" style="width:266px;" value=""
                                       placeholder="请输入上一步所选证照上的单位名称 " maxlength="30"></td>
                        </tr>
                        <tr class="necessary">
                            <td class="td_lf"><em class="star">*</em>区域</td>
                            <td>
                                <!--<div class="select_s" style="width:131px; float:left;">-->
                                    <!--<div class="select_is" style="width:132px;">-->
                                        <!--<select class="select_cs"-->
                                                <!--style="width:147px; background-position:-63px -122px; " id="provinces">-->
                                            <!--<option>请选择</option>-->
                                            <!--<option selected="selected">上海市</option>-->
                                            <!--<option>浙江省</option>-->
                                            <!--<option>江苏省</option>-->
                                            <!--<option>北京市</option>-->
                                            <!--<option>天津市</option>-->
                                            <!--<option>河北省</option>-->
                                            <!--<option>山西省</option>-->
                                            <!--<option>内蒙古自治区</option>-->
                                            <!--<option>辽宁省</option>-->
                                            <!--<option>吉林省</option>-->
                                            <!--<option>黑龙江省</option>-->
                                            <!--<option>安徽省</option>-->
                                            <!--<option>福建省</option>-->
                                            <!--<option>江西省</option>-->
                                            <!--<option>山东省</option>-->
                                            <!--<option>河南省</option>-->
                                            <!--<option>湖北省</option>-->
                                            <!--<option>湖南省</option>-->
                                            <!--<option>广东省</option>-->
                                            <!--<option>广西壮族自治区</option>-->
                                            <!--<option>海南省</option>-->
                                            <!--<option>重庆市</option>-->
                                            <!--<option>四川省</option>-->
                                            <!--<option>贵州省</option>-->
                                            <!--<option>云南省</option>-->
                                            <!--<option>西藏自治区</option>-->
                                            <!--<option>陕西省</option>-->
                                            <!--<option>甘肃省</option>-->
                                            <!--<option>青海省</option>-->
                                            <!--<option>宁夏回族自治区</option>-->
                                            <!--<option>新疆维吾尔自治区</option>-->
                                        <!--</select>-->
                                    <!--</div>-->
                                <!--</div>-->
                                <div class="select_s" style="width:141px; float:left; margin-left:10px;">
                                    <div class="select_is" style="width:141px;">
                                        <select class="select_cs"
                                                style="width:160px; background-position:-55px -122px; " id="cities">
                                            <option>请选择</option>
                                            <option selected="selected">上海市</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="select_s" style="width:122px; float:left; margin-left:10px;">
                                    <div class="select_is" style="width:122px;">
                                        <select class="select_cs"
                                                style="width:152px; background-position:-70px -122px; " id="districts">
                                            <option>请选择区县</option>
                                            <option>浦东</option>
                                            <option>黄浦</option>
                                            <option>静安</option>
                                            <option>徐汇</option>
                                            <option>长宁</option>
                                            <option>普陀</option>
                                            <option>虹口</option>
                                            <option>杨浦</option>
                                            <option>宝山</option>
                                            <option>闵行</option>
                                            <option>嘉定</option>
                                            <option>金山</option>
                                            <option>松江</option>
                                            <option>青浦</option>
                                            <option>奉贤</option>
                                            <option>崇明</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="select_s mmmaaa" style="width:122px; float:left; margin-left:10px;">
                                    <div class="select_is" style="width:122px;">
                                        <select class="select_cs"
                                                style="width:152px; background-position:-70px -122px; " id="streets">
                                            <option>请选择街道</option>
                                        </select>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_lf line"><em class="star">*</em>单位地址</td>
                            <td class="line">
                                <span id="provinceName">上海市</span><span id="cityName">上海市</span><span
                                    id="districtName"></span><span id="streetName"></span>
                                <input id="address" type="text" class="input_code" style="width:266px;" value=""
                                       placeholder="请输入上一步所选证照上的注册地址 " maxlength="50"></td>
                        </tr>
                        <tr>
                            <td class="td_lf"><em class="star">*</em>联系人</td>
                            <td><input id="person" type="text" class="input_code"
                                       style="width: 266px; color: rgb(0, 0, 0);" value="" maxlength="10"></td>
                        </tr>
                        <tr>
                            <td class="td_lf"><em class="star">*</em>手机</td>
                            <td><input id="mobilephone" type="text" class="input_code" style="width:266px;" value=""
                                       maxlength="20"></td>
                        </tr>
                        <tr>
                            <td colspan="2" class="gray">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：登录后，可在“系统管理-个人中心”完成手机认证，手机认证后，可使用短信验证找回密码。</td>
                        </tr>
                        <tr>
                            <td class="td_lf"><em class="star">*</em>登录账号</td>
                            <td><input id="username" type="text" class="input_code" style="width:266px;" value=""
                                       maxlength="20" placeholder="4-20位数字、大小写字母、以及@_ "></td>
                        </tr>
                        <tr>
                            <td class="td_lf"><em class="star">*</em>密码</td>
                            <td><input id="password" type="password" class="input_code" style="width:266px;" value=""
                                       maxlength="20" placeholder="6-20位数字、大小写字母、@_的至少两种组合"></td>
                        </tr>
                        <tr>
                            <td class="td_lf line"><em class="star">*</em>密码确认</td>
                            <td class="line"><input id="password_confirm" type="password" class="input_code"
                                                    style="width:266px;" value="" maxlength="20"></td>
                        </tr>
                        </tbody>
                    </table>

                </div>
                <p class="save_box">
                    <input type="button" class="btn_save" id="back" value="上一步">
                    <input type="button" class="btn_save" id="btn_save" value="提交">
                </p>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        var url = location.search; //获取url中"?"符后的字串
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            for(var i = 0; i < strs.length; i ++) {
                theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
            }
        }
        console.log(theRequest.code)
        certNo = theRequest.code
        $('#certNo').text(certNo)
    })
</script>
</body>
</html>